const app = new Vue({
	data: {
		msg: "Class 与 Style 绑定",
		isRed: false,
		isActive: true,
		hasError: false,
		// classObj: { 
		// 	red: false,
		// 	'text-danger': false,
		// }
		// h1Class: ""
		activeClass: 'red',
		errorClass: 'text-danger',
		msgColor: "yellow",
		msgHeight: 100,
		styleObj: {
			color: "yellow",
			height: "100px"
		},
		styleObj1: {
			height: "500px",
			lineHeight: "500px"
		},
		selectedIndex: 1
	},
	computed: {
		classObj() {
			return {
				red: this.isActive,
				'text-danger': this.hasError,
			}
		}
	},
	methods: {
		handleClick(index) {
			this.selectedIndex = index
		}
	}
}).$mount("#app")


